package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.stark.sspguide.lib.SspReportUtil;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityInstDetailBinding;
import stark.common.basic.event.EventStatProxy;

public class InstDetailActivity extends BaseAc<ActivityInstDetailBinding> {

    public static String city;

    @Override
    protected int onCreate() {
        return R.layout.activity_inst_detail;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);
        mDataBinding.ivInstDetailBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }

    @Override
    protected void initData() {
        if (city.isEmpty()) return;
        if (city.equals(getString(R.string.city_bj))) {
            mDataBinding.tvInstDetailTitle.setText(getString(R.string.inst_detail_bj_title));
            /*mDataBinding.tvIntDetailDesc.setText(getString(R.string.inst_detail_bj_detail));
            mDataBinding.ivInstDetailImg.setImageResource(R.drawable.i1);*/
            SspReportUtil.setGuideContent(mDataBinding.tvContent, SspReportUtil.City.BEIJING);
        } else if (city.equals(getString(R.string.city_sh))) {
            mDataBinding.tvInstDetailTitle.setText(getString(R.string.inst_detail_sh_title));
            /*mDataBinding.tvIntDetailDesc.setText(getString(R.string.inst_detail_sh_detail));
            mDataBinding.ivInstDetailImg.setImageResource(R.drawable.i2);*/
            SspReportUtil.setGuideContent(mDataBinding.tvContent, SspReportUtil.City.SHANGHAI);

        } else if (city.equals(getString(R.string.city_gz))) {
            mDataBinding.tvInstDetailTitle.setText(getString(R.string.inst_detail_gz_title));
            /*mDataBinding.tvIntDetailDesc.setText(getString(R.string.inst_detail_gz_detail));
            mDataBinding.ivInstDetailImg.setImageResource(R.drawable.i3);*/
            SspReportUtil.setGuideContent(mDataBinding.tvContent, SspReportUtil.City.GUANGZHOU);

        }else if (city.equals(getString(R.string.city_sz))){
            mDataBinding.tvInstDetailTitle.setText(getString(R.string.inst_detail_sz_title));
            /*mDataBinding.tvIntDetailDesc.setText(getString(R.string.inst_detail_sz_detail));
            mDataBinding.ivInstDetailImg.setImageResource(R.drawable.i4);*/
            SspReportUtil.setGuideContent(mDataBinding.tvContent, SspReportUtil.City.SHENZHEN);

        }
    }
}